﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Security.Cryptography;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace CoreShop.Library
{
    public class LogManager
    {
        /// <summary>	
        /// 写入日志文件	
        /// </summary>	
        /// <param name="input"></param>	
        public static void WriteTxtLog(string input)
        {
            try
            {
                string folder = Directory.GetCurrentDirectory() + "\\Log";
                if (!Directory.Exists(folder))
                {
                    Directory.CreateDirectory(folder);
                }
                string file = folder + "\\" + System.DateTime.Now.ToString("yyyyMMdd") + ".txt";
                using (StreamWriter SW = File.AppendText(file))
                {
                    SW.Write(input+"\n");
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
}
